{if $can_add eq 1}
<div class="form-group col-xs-2">
    <div class="col-xs-12">
        <button type="button" onclick="modal('{:url(\'add\')}', '添加价格')" class="btn btn-success">
            添加价格
        </button>
    </div>
</div>
{/if}
<table class="table table-striped table-bordered" id="tablist">
    <tr id="tabid">
        <th>日期</th>
        <th>当日价格</th>
        <th>周分红数量</th>
        <th>总求购数量</th>
        <th>总成交量</th>
        <th>是否生效</th>
        <th>操作</th>
    </tr>
    {foreach $list as $item}
    <tr>
        <td>
            {$item.day_time}
        </td>
        <td>
            {$item.day_price}
        </td>
        <td>
            {$item.bonus}
        </td>
        <td>
            {$item.qiugou}
        </td>
        <td>
            {$item.deal}
        </td>
        <td>
            {if $item.status eq 1}
            <label class="label label-warning">未生效</label>
            {else}
            <label class="label label-success">已生效</label>
            {/if}
        </td>
        <td>
            {if $item.status eq 1}
            <button class="btn btn-primary" onclick="modal('{:url(\'add\', [\'id\'=>$item.id])}', '编辑价格')">编辑</button>
            {/if}
        </td>
    </tr>
    {/foreach}
</table>

<div class="row">
    <div class="col-xs-12" style="text-align: right;">
        {$list->render()}
    </div>
</div>